/**
 * 模拟，给定操作一共进行K轮
 * K比较小，直接模拟
 */
#include<bits/stdc++.h>
using namespace std;

using llt = long long;
using vi = vector<int>;

int K, G, M;

void proc(){
	int glass = 0, mug = 0;
	for(int i=0;i<K;++i){
        if(glass == G){
			glass = 0;
		}else if(0 == mug){
			mug = M;
		}else{
			auto need = G - glass;
			if(need <= mug){
				glass = G;
				mug -= need;
			}else{
				glass += mug;
				mug = 0;
				
			}
		}
	}
	cout << glass << " " << mug << endl;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
	ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
    cin >> K >> G >> M;
	proc();
	return 0;
}